package com.ybfenpan.controller.admin.sys;


import com.ybfenpan.controller.core.BaseController;
import com.ybfenpan.service.MemberService;
import com.ybfenpan.service.WageCurrentService;
import com.ybfenpan.service.log.LogMoneyService;
import com.ybfenpan.utils.DBUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * Created by Administrator on 2016/3/25.
 */
@Controller
 
public class testController extends BaseController {
	 
	@Resource
	private MemberService memberService;
	 
	@Resource
	private LogMoneyService logMoneyService;
	
	@Resource
	private WageCurrentService wageCurrentService;
    @RequestMapping("admin/sys/test.shtml")
	public String test(ModelMap model, HttpServletRequest request, HttpServletResponse response) throws InterruptedException {
		wageCurrentService.saveWageCount();
//		wageCurrentService.savePeng();
		setMessage(model,"提交成功。");
		Boolean result = true;
		request.setAttribute("result", result);
		return "admin/sys/test";
	}

	@RequestMapping("admin/sys/test1.shtml")
	public String test1(ModelMap model, HttpServletRequest request, HttpServletResponse response) throws InterruptedException {
		wageCurrentService.savePeng();
		setMessage(model,"提交成功。");
		Boolean result = true;
		request.setAttribute("result", result);
		return "admin/sys/test";
	}

    @RequestMapping("admin/sys/test2.shtml")
    public String test2(ModelMap model, HttpServletRequest request, HttpServletResponse response) throws InterruptedException {

    	wageCurrentService.saveFenHong();
		setMessage(model,"提交成功。");
    	Boolean result = true;
    	request.setAttribute("result", result); 
		return "admin/sys/test2";
    }
  
}
